﻿using System;

namespace HashCalculator.Commands
{
    class DelegateCommand : DelegateCommandBase
    {
        public DelegateCommand(Action execute) : this(execute, () => true) { }

        public DelegateCommand(Action execute, Func<bool> canExecute) : base(o => execute(), o => canExecute()) { }

        public void Execute()
        {
            Execute(null);
        }

        public bool CanExecute()
        {
            return CanExecute(null);
        }
    }
}
